import random

print ('if的循环语句')
times = 10
# random伪随机数
answer = random.randint(1,100)

while times > 0 :
    temp = input('猜一下我心中想的是哪个数字：')
    guess = int(temp)
    if guess == answer :
        print('你猜对了，真厉害')
        print('不过，没有奖励')
        break
    else:
        if guess < answer :
            print('猜小了')
        else :
            print("猜大了")
    times = times - 1
print('游戏结束')
